#!/bin/bash

services=("register" "gateway" "user")

for service in ${services[@]}
do
# 拷贝打包好的JAR包
cp $WORKSPACE/$service/target/$service-1.0-SNAPSHOT.jar .
# 构建和推送镜像
docker build -t $service:latest -f $WORKSPACE/docker/$service/Dockerfile .
docker tag $service:latest dev:8153/test/$service:latest
docker push dev:8153/test/$service:latest
done
